<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>后台管理</title>
  <link rel="stylesheet" type="text/css" href="../static/css/iview.css">
  <script type="text/javascript" src="../static/js/vue.mini.js"></script>
  <script type="text/javascript" src="../static/js/iview.mini.js"></script>
  <script type="text/javascript" src="../static/js/jquery.mini.js"></script>
  <!--异步请求两个必须的文件-->
  <script type="text/javascript" src="../static/js/axios.mini.js"></script>
  <script type="text/javascript" src="../static/js/qs.mini.js"></script>
  <script type="text/javascript" src="../static/js/node_modules/bluebird/js/browser/bluebird.js"></script>
  <script type="text/javascript" src="../static/js/node_modules/babel-polyfill/dist/polyfill.js"></script>
</head>
<style>
  .p-alert{
    font-size: 20px;
    padding: 10px;
  }
</style>
<body>
<div id="app">
  <div style="font-size: 20px; margin-bottom: 20px;margin-top: 20px;margin-left: 8px">
    <i-input v-model="search" placeholder="支持模糊查询：如班级、学号" style="width: 200px"></i-input>
    <i-button @click="searchBtn">查询</i-button>
      <i-button @click="download">下载导入信息模板</i-button>
    <i-button @click="add">导入学生信息</i-button>
    <!--<i-button @click="update">修改</i-button>-->
    <!--<i-button @click="del">删除</i-button>-->
  </div>

<Modal v-model="visible" title="上传Excel表">
  <!--<Upload-->
        <!--ref="upload"-->
        <!--:show-upload-list="false"-->
        <!--type="drag"-->
        <!--:format="['xls']"-->
        <!--:max-size="102400"-->
        <!--:on-exceeded-size="handleMaxSize"-->
        <!--:on-format-error="handleFormatError"-->
        <!--:on-success="handleSuccess"-->
        <!--:headers="headers"-->
        <!--:action="action"-->
        <!--style="display: inline-block;width:480px;">-->
  <!--<div style="padding: 20px 0">-->
    <!--<Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>-->
    <!--<p>请选择xls文件，支持拖拽上传</p>-->
  <!--</div>-->
<!--</Upload>-->
  <Upload
          ref="upload"
          multiple
          type="drag"
          :format="['xls']"
          :max-size="102400"
          :on-success="handleSuccess"
          :on-exceeded-size="handleMaxSize"
          :on-format-error="handleFormatError"
          :headers="headers"
          action="../student/import">
    <div style="padding: 20px 0">
      <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
      <p>选择xls文件，支持拖拽上传</p>
    </div>
  </Upload>
</Modal>
  <Modal v-model="down" title="下载模板">
    <p class="p-alert">请使用chrome浏览器以及firefox浏览器，其他浏览器暂未测试通过</p>
    <p class="p-alert" >前七列必须填写，后面的没有请填写无</p>
    <p class="p-alert" >模板仅需填写数据，请不要改变模板样式</p>
   <a style="font-size: 28px;padding: 10px" href="../static/学生信息表模板.xls" download="学生信息表模板">下载Excel模板</a>
    <div slot="footer">
      <i-Button type="primary" size="large" @click="closedown" >关闭</i-Button>
    </div>

  </Modal>

  <i-Table border :columns="columns4" :data="dataList"  @on-select="isSelect" @on-select-cancel="NoSelect" @on-select-all="all_ok" @on-select-all-cancel="all_cancel"></i-Table>
</div>
<script type="text/javascript" src="../static/js/student.js"></script>
</body>
</html>
